/**
 * 
 */
package cn.edu.bjtu.entity.impl.local;

import java.util.Map;
import java.util.concurrent.locks.ReadWriteLock;

import cn.edu.bjtu.alex.rewrite.Context;
import cn.edu.bjtu.alex.rewrite.TransformDriver;

/**
 * @author alex
 *
 */
public class TFIDFTransExecuteContext extends BaseTFIDFExecuteContext {
	/**
	 * @param lock
	 * @param in
	 * @param out
	 * @param ctx
	 */
	public TFIDFTransExecuteContext(ReadWriteLock lock, String in, String out, Context ctx) {
		super(lock, in, out, ctx);
	}
	/**
	 * @param ctx 容器
	 * @param d 开始日期
	 */
	@Override
	protected void fireInternal() {
		try{
			ctx.transLock.readLock().lock(); 
			new TransformDriver(this.ctx).transform();
		}finally{
			ctx.transLock.readLock().unlock(); 
		}
	}
	@Override
	public boolean isNoCache() {
		return false;
	}
	@Override
	public Map<String, Object> getResultMapForRender() {
		return null;
	}
	@Override
	public Context javaClassResult() {
		return ctx;
	}

}
